<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fdk-aac: original/libSBRdec/src/sbrdec_freq_sca.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fdk-aac
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ed137715e08969a186ec660e8ae6e2fb.html">original</a></li><li class="navelem"><a class="el" href="dir_222de58a05c98cc4a78309a37525cd28.html">libSBRdec</a></li><li class="navelem"><a class="el" href="dir_c997d48ad60fbe63e2ba342b9c79db98.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">sbrdec_freq_sca.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Frequency scale calculation.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="sbrdec__freq__sca_8h_source.html">sbrdec_freq_sca.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="transcendent_8h_source.html">transcendent.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__rom_8h_source.html">sbr_rom.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="env__extr_8h_source.html">env_extr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="generic_stds_8h_source.html">genericStds.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a014ef7bb141b556358a7dc8e470709e1"><td class="memItemLeft" align="right" valign="top"><a id="a014ef7bb141b556358a7dc8e470709e1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_OCTAVE</b>&#160;&#160;&#160;29</td></tr>
<tr class="separator:a014ef7bb141b556358a7dc8e470709e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f6217cf2c6230e60456a1539b971920"><td class="memItemLeft" align="right" valign="top"><a id="a1f6217cf2c6230e60456a1539b971920"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SECOND_REGION</b>&#160;&#160;&#160;50</td></tr>
<tr class="separator:a1f6217cf2c6230e60456a1539b971920"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a192471849733a70d7f0fed8a62bbd7b3"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdec__freq__sca_8cpp.html#a192471849733a70d7f0fed8a62bbd7b3">sbrdecUpdateFreqScale</a> (<a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *v_k_master, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *numMaster, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> fs, <a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags)</td></tr>
<tr class="memdesc:a192471849733a70d7f0fed8a62bbd7b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates master frequency tables.  <a href="sbrdec__freq__sca_8cpp.html#a192471849733a70d7f0fed8a62bbd7b3">More...</a><br /></td></tr>
<tr class="separator:a192471849733a70d7f0fed8a62bbd7b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b7b636caa829dcd20c19735ca9dcbfd"><td class="memItemLeft" align="right" valign="top"><a id="a5b7b636caa829dcd20c19735ca9dcbfd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdec__freq__sca_8cpp.html#a5b7b636caa829dcd20c19735ca9dcbfd">sbrdecDownSampleLoRes</a> (<a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *v_result, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> num_result, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *freqBandTableRef, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> num_Ref)</td></tr>
<tr class="memdesc:a5b7b636caa829dcd20c19735ca9dcbfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Derive a low-resolution frequency-table from the master frequency table. <br /></td></tr>
<tr class="separator:a5b7b636caa829dcd20c19735ca9dcbfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d878028f803af36ea17135b7af4b434"><td class="memItemLeft" align="right" valign="top"><a id="a1d878028f803af36ea17135b7af4b434"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdec__freq__sca_8cpp.html#a1d878028f803af36ea17135b7af4b434">shellsort</a> (<a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *in, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> n)</td></tr>
<tr class="memdesc:a1d878028f803af36ea17135b7af4b434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting routine. <br /></td></tr>
<tr class="separator:a1d878028f803af36ea17135b7af4b434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3af68ffc9d3e9b1ac89c78103310c25d"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sbrdec__freq__sca_8cpp.html#a3af68ffc9d3e9b1ac89c78103310c25d">resetFreqBandTables</a> (<a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags)</td></tr>
<tr class="memdesc:a3af68ffc9d3e9b1ac89c78103310c25d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset frequency band tables.  <a href="sbrdec__freq__sca_8cpp.html#a3af68ffc9d3e9b1ac89c78103310c25d">More...</a><br /></td></tr>
<tr class="separator:a3af68ffc9d3e9b1ac89c78103310c25d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Frequency scale calculation. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3af68ffc9d3e9b1ac89c78103310c25d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3af68ffc9d3e9b1ac89c78103310c25d">&#9670;&nbsp;</a></span>resetFreqBandTables()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR resetFreqBandTables </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset frequency band tables. </p>
<dl class="section return"><dt>Returns</dt><dd>errorCode, 0 if successful </dd></dl>

</div>
</div>
<a id="a192471849733a70d7f0fed8a62bbd7b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a192471849733a70d7f0fed8a62bbd7b3">&#9670;&nbsp;</a></span>sbrdecUpdateFreqScale()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR sbrdecUpdateFreqScale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>v_k_master</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> *&#160;</td>
          <td class="paramname"><em>numMaster</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>fs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generates master frequency tables. </p>
<p>Frequency tables are calculated according to the selected domain (linear/logarithmic) and granularity. IEC 14496-3 4.6.18.3.2.1</p>
<dl class="section return"><dt>Returns</dt><dd>errorCode, 0 if successful </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v_k_master</td><td>Master table to be created </td></tr>
    <tr><td class="paramname">numMaster</td><td>Number of entries in master table </td></tr>
    <tr><td class="paramname">fs</td><td>SBR working sampling rate </td></tr>
    <tr><td class="paramname">hHeaderData</td><td>Control data from bitstream </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
